package org.geektimes.web.mvc.initializer;

import javax.servlet.ServletContext;
import javax.servlet.ServletRegistration.Dynamic;

import org.geektimes.web.mvc.FrontControllerServlet;

public class MyWebMvcApplicationInitializer implements ApplicationInitializer {

	@Override
	public int getOrder() {
		return 100;
	}

	@Override
	public void onStartup(ServletContext servletContext) {
		Dynamic frontControllerServletDynamic = servletContext.addServlet("frontControllerServlet",
				FrontControllerServlet.class);
		frontControllerServletDynamic.setLoadOnStartup(1);
		frontControllerServletDynamic.addMapping("/");
	}

}
